<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/gb/metasprites.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('gb_2metasprites_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">metasprites.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="gb_2metasprites_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">#ifndef _METASPRITES_H_INCLUDE</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#define _METASPRITES_H_INCLUDE</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="gb_2hardware_8h.html">gb/hardware.h</a>&gt;</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor">#include &lt;types.h&gt;</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="stdint_8h.html">stdint.h</a>&gt;</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="structmetasprite__t.html">  102</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmetasprite__t.html">metasprite_t</a> {</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">  103</a></span>&#160;    <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>  <a class="code" href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">dy</a>, <a class="code" href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">dx</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">  104</a></span>&#160;    <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">dtile</a>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="structmetasprite__t.html#ab61e73a65c5e8cb30d0d81bb7845d615">  105</a></span>&#160;    <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="structmetasprite__t.html#ab61e73a65c5e8cb30d0d81bb7845d615">props</a>;</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">  106</a></span>&#160;} <a class="code" href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a9f9f390a57460914e27c7604b7d8379a">  108</a></span>&#160;<span class="preprocessor">#define metasprite_end -128</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#aa88dc4d5e35045509b8955a4a23a30aa">  109</a></span>&#160;<span class="preprocessor">#define METASPR_ITEM(dy,dx,dt,a) {(dy),(dx),(dt),(a)}</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#aa1d425dcce3cd104751744535b6a389a">  110</a></span>&#160;<span class="preprocessor">#define METASPR_TERM {metasprite_end}</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> * <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a>;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipx(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipy(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_flipxy(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_vflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_hflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite_hvflip(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> yx);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> __hide_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a7f682afd53ac62ba02b0b6bc18d9cae5">  134</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#a7f682afd53ac62ba02b0b6bc18d9cae5">hide_sprites_range</a>(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> from, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> to);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a6a320e8632e35cba926e089b035146e1">  159</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a6a320e8632e35cba926e089b035146e1">move_metasprite_ex</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">return</span> __move_metasprite(base_sprite, (y &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)x);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;}</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">  168</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordflow">return</span> __move_metasprite(base_sprite, (y &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)x);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;}</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a061cc1e8214c86414dc1d5017b9c8be2">  199</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a061cc1e8214c86414dc1d5017b9c8be2">move_metasprite_flipx</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipx(base_sprite, (y &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(x - 8u));</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;}</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#aa8ff2df0679ebb0b6e0a8f6d83127e1a">  208</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#aa8ff2df0679ebb0b6e0a8f6d83127e1a">move_metasprite_vflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_vflip(base_sprite, (y &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(x - 8u));</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a4de12dbe1868a2a408e8ef583ccc9df1">  240</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a4de12dbe1868a2a408e8ef583ccc9df1">move_metasprite_flipy</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipy(base_sprite, ((y - ((<a class="code" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a> &amp; <a class="code" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a>) ? 16u : 8u)) &lt;&lt; 8) | x);</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;}</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a27e3bb17d0458b60b1f0433f66301f46">  249</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a27e3bb17d0458b60b1f0433f66301f46">move_metasprite_hflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_hflip(base_sprite, ((y - ((<a class="code" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a> &amp; <a class="code" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a>) ? 16u : 8u)) &lt;&lt; 8) | x);</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;}</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a21a071eea8fb69b577cfcd86aad5bdac">  280</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a21a071eea8fb69b577cfcd86aad5bdac">move_metasprite_flipxy</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_prop, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = base_prop;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_flipxy(base_sprite, ((y - ((<a class="code" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a> &amp; <a class="code" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a>) ? 16u : 8u)) &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(x - 8));</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;}</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#a32a61acd4a76d1de5814f7b94c8bc23f">  289</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a32a61acd4a76d1de5814f7b94c8bc23f">move_metasprite_hvflip</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a> = 0;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">return</span> __move_metasprite_hvflip(base_sprite, ((y - ((<a class="code" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a> &amp; <a class="code" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a>) ? 16u : 8u)) &lt;&lt; 8) | (<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(x - 8));</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;}</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; </div>
<div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">  305</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite) {</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    __hide_metasprite(base_sprite);</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;}</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="agb_2hardware_8h_html"><div class="ttname"><a href="gb_2hardware_8h.html">hardware.h</a></div></div>
<div class="ttc" id="agb_2hardware_8h_html_a14eddd3d53d8e649f1754bd455b4863d"><div class="ttname"><a href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a></div><div class="ttdeci">#define LCDCF_OBJ16</div><div class="ttdef"><b>Definition:</b> hardware.h:247</div></div>
<div class="ttc" id="agb_2hardware_8h_html_a6515fdfaa50eeb7e63faeea54f77cd6b"><div class="ttname"><a href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a></div><div class="ttdeci">__REG LCDC_REG</div><div class="ttdef"><b>Definition:</b> hardware.h:182</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a061cc1e8214c86414dc1d5017b9c8be2"><div class="ttname"><a href="gb_2metasprites_8h.html#a061cc1e8214c86414dc1d5017b9c8be2">move_metasprite_flipx</a></div><div class="ttdeci">uint8_t move_metasprite_flipx(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:199</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a21a071eea8fb69b577cfcd86aad5bdac"><div class="ttname"><a href="gb_2metasprites_8h.html#a21a071eea8fb69b577cfcd86aad5bdac">move_metasprite_flipxy</a></div><div class="ttdeci">uint8_t move_metasprite_flipxy(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:280</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a27e3bb17d0458b60b1f0433f66301f46"><div class="ttname"><a href="gb_2metasprites_8h.html#a27e3bb17d0458b60b1f0433f66301f46">move_metasprite_hflip</a></div><div class="ttdeci">uint8_t move_metasprite_hflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:249</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a32a61acd4a76d1de5814f7b94c8bc23f"><div class="ttname"><a href="gb_2metasprites_8h.html#a32a61acd4a76d1de5814f7b94c8bc23f">move_metasprite_hvflip</a></div><div class="ttdeci">uint8_t move_metasprite_hvflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:289</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a345fa52509387bd18a4092178a18286f"><div class="ttname"><a href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a></div><div class="ttdeci">uint8_t __current_base_tile</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a4bfe4d95031b67951cf6bc342110db39"><div class="ttname"><a href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a></div><div class="ttdeci">uint8_t __render_shadow_OAM</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a4de12dbe1868a2a408e8ef583ccc9df1"><div class="ttname"><a href="gb_2metasprites_8h.html#a4de12dbe1868a2a408e8ef583ccc9df1">move_metasprite_flipy</a></div><div class="ttdeci">uint8_t move_metasprite_flipy(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:240</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a6a320e8632e35cba926e089b035146e1"><div class="ttname"><a href="gb_2metasprites_8h.html#a6a320e8632e35cba926e089b035146e1">move_metasprite_ex</a></div><div class="ttdeci">uint8_t move_metasprite_ex(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:159</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a77475e913bf0a19df28bdbf9d1cf392b"><div class="ttname"><a href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a></div><div class="ttdeci">uint8_t move_metasprite(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:168</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_a7f682afd53ac62ba02b0b6bc18d9cae5"><div class="ttname"><a href="gb_2metasprites_8h.html#a7f682afd53ac62ba02b0b6bc18d9cae5">hide_sprites_range</a></div><div class="ttdeci">void hide_sprites_range(uint8_t from, uint8_t to)</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aa8ff2df0679ebb0b6e0a8f6d83127e1a"><div class="ttname"><a href="gb_2metasprites_8h.html#aa8ff2df0679ebb0b6e0a8f6d83127e1a">move_metasprite_vflip</a></div><div class="ttdeci">uint8_t move_metasprite_vflip(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:208</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aae51f066cc5436457f62351847bfc64b"><div class="ttname"><a href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a></div><div class="ttdeci">const void * __current_metasprite</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_aba6401cc8173158a9f37ee22094c03d3"><div class="ttname"><a href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a></div><div class="ttdeci">struct metasprite_t metasprite_t</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_af2dc6b61dc598c155217788049a5416b"><div class="ttname"><a href="gb_2metasprites_8h.html#af2dc6b61dc598c155217788049a5416b">__current_base_prop</a></div><div class="ttdeci">uint8_t __current_base_prop</div></div>
<div class="ttc" id="agb_2metasprites_8h_html_af8de5a888d65448b9d34027a0e1ce906"><div class="ttname"><a href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a></div><div class="ttdeci">void hide_metasprite(const metasprite_t *metasprite, uint8_t base_sprite)</div><div class="ttdef"><b>Definition:</b> metasprites.h:305</div></div>
<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
<div class="ttc" id="astdint_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div>
<div class="ttc" id="astdint_8h_html_adf4d876453337156dde61095e1f20223"><div class="ttname"><a href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a></div><div class="ttdeci">unsigned short int uint16_t</div><div class="ttdef"><b>Definition:</b> stdint.h:52</div></div>
<div class="ttc" id="astdint_8h_html_aef44329758059c91c76d334e8fc09700"><div class="ttname"><a href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a></div><div class="ttdeci">signed char int8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:43</div></div>
<div class="ttc" id="astructmetasprite__t_html"><div class="ttname"><a href="structmetasprite__t.html">metasprite_t</a></div><div class="ttdef"><b>Definition:</b> metasprites.h:102</div></div>
<div class="ttc" id="astructmetasprite__t_html_a2c3fea1f6b3354352823320c69a3e4bb"><div class="ttname"><a href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">metasprite_t::dy</a></div><div class="ttdeci">int8_t dy</div><div class="ttdef"><b>Definition:</b> metasprites.h:103</div></div>
<div class="ttc" id="astructmetasprite__t_html_a67d2a6fb62059da39b54e975c4fbb324"><div class="ttname"><a href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">metasprite_t::dx</a></div><div class="ttdeci">int8_t dx</div><div class="ttdef"><b>Definition:</b> metasprites.h:103</div></div>
<div class="ttc" id="astructmetasprite__t_html_ab61e73a65c5e8cb30d0d81bb7845d615"><div class="ttname"><a href="structmetasprite__t.html#ab61e73a65c5e8cb30d0d81bb7845d615">metasprite_t::props</a></div><div class="ttdeci">uint8_t props</div><div class="ttdef"><b>Definition:</b> metasprites.h:105</div></div>
<div class="ttc" id="astructmetasprite__t_html_ad68b2f80c08f2f7fc603c56af2e75a6f"><div class="ttname"><a href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">metasprite_t::dtile</a></div><div class="ttdeci">uint8_t dtile</div><div class="ttdef"><b>Definition:</b> metasprites.h:104</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
